{extend name="layout" /}

{block name="page-header"}{/block}

{block name="content"}
    {notempty name="default_pass"}
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h3 class="font-w300 push-15">安全提示</h3>
        <p>超级管理员默认密码未修改，建议马上 <a class="alert-link link-effect" href="{:url('user/index/edit', ['id' => 1])}">修改</a>。</p>
    </div>
    {/notempty}
    {// 后台首页钩子}
    

    <div class="row">
        <div class="col-sm-6 col-md-3">
            <a class="block block-link-hover3 text-center" href="/admin.php/admin/user/index.html">
                <div class="block-content block-content-full">
                    <div class="h1 font-w700 text-primary" data-toggle="countTo" data-to="0">{$yonghushuliang}</div>
                </div>
                <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">用户数量</div>
            </a>
        </div>
        <div class="col-sm-6 col-md-3">
            <a class="block block-link-hover3 text-center" href="/admin.php/admin/shiti/index.html">
                <div class="block-content block-content-full">
                    <div class="h1 font-w700 text-success" data-toggle="countTo" data-to="0">{$shitinum}</div>
                </div>
                <div class="block-content block-content-full block-content-mini bg-gray-lighter text-muted font-w600">试题总数</div>
            </a>
        </div>
        
    </div>
    <div class="row">
        {:hook('admin_index')}
    </div>
{/block}

{block name="script"}
<script>
    $(document).ready(function () {
        $.ajax({
            url: '{:url("checkUpdate")}',
            type: 'GET'
        }).done(function(data) {
            $('#product-auth').html(data.auth);
            $('#product-update').html($('#product-update').text() + ' ' + data.update);
        });
    });
</script>
{/block}